package com.sfj.system.controller;

import com.kaka.starter.control.dto.ResultBean;
import com.sfj.system.dto.task.ProcessReviewDTO;
import com.sfj.system.service.task.ProblemService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @author kaka
 * @Date 2025/07/08
 */
@Api(tags = "反馈信息")
@RequestMapping("problem")
@Slf4j
@RestController
public class ProblemProcessContrtoller {

    @Autowired
    private ProblemService problemService;

    @GetMapping("/get/{taskId}")
    @ApiOperation(value = "获取反馈信息提供复核", notes = "获取反馈信息提供复核")
    public ResultBean queryReview(@PathVariable Integer taskId) {
        return ResultBean.succeed(problemService.queryReview(taskId));
    }

    @PostMapping("/processReview")
    @ApiOperation(value = "反馈任务复核", notes = "反馈任务复核")
    public ResultBean processReview(@RequestBody ProcessReviewDTO processReviewDTO) {
        return ResultBean.succeed(problemService.processReview(processReviewDTO));
    }
}
